package com.task5.entity;

public class OrderDetail {
	private int id;
	private String sid;
	private int pid;
	private String pname;
	private float pprice;
	private int num;

	public OrderDetail() {
	}
	
	public OrderDetail(String sid, int pid, String pname, float pprice, int num) {
		this.sid = sid;
		this.pid = pid;
		this.pname = pname;
		this.pprice = pprice;
		this.num = num;
	}

	public OrderDetail(int id, String sid, int pid, String pname, float pprice, int num) {
		this.id = id;
		this.sid = sid;
		this.pid = pid;
		this.pname = pname;
		this.pprice = pprice;
		this.num = num;
	}

	public String getPKName() {
		return "id";
	}
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getSid() {
		return sid;
	}

	public void setSid(String sid) {
		this.sid = sid;
	}

	public int getPid() {
		return pid;
	}

	public void setPid(int pid) {
		this.pid = pid;
	}

	public String getPname() {
		return pname;
	}

	public void setPname(String pname) {
		this.pname = pname;
	}

	public float getPprice() {
		return pprice;
	}

	public void setPprice(float pprice) {
		this.pprice = pprice;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("OrderDetail [id=");
		builder.append(id);
		builder.append(", sid=");
		builder.append(sid);
		builder.append(", pid=");
		builder.append(pid);
		builder.append(", pname=");
		builder.append(pname);
		builder.append(", pprice=");
		builder.append(pprice);
		builder.append(", num=");
		builder.append(num);
		builder.append("]");
		return builder.toString();
	}
}
